This example uses the bcm2835 library to comunicate with the SPI.
The reference web site is: http://www.airspayce.com/mikem/bcm2835/

Download the library: http://www.airspayce.com/mikem/bcm2835/bcm2835-1.71.tar.gz, then:

tar zxvf bcm2835-1.71.tar.gz
cd bcm2835-1.71
./configure
make
sudo make check
sudo make install
